package com.flute.haflute.common;

public interface ClusterConstants {
	/**
	 * DM：指定主节点，集群的根控制节点<br>
	 * BDM：备用主节点，集群的备份根节点<br>
	 * SM：选举主节点，根据集群扩展和工作调度时，管理部分SLAVE节点，并向DM/BDM汇报的节点 <br>
	 * SLAVE：从节点，为普通节点，向DM/BDM或者SM汇报信息，执行任务，为集群任务执行成员<br>
	 * 
	 */
	public enum ROLE {
		DM, BDM, SM, SLAVE
	}

	public enum JOB_ROLL {
		MASTER, CHILD
	}

	public final static String TOPO_WATCHER = "TOPO_WATCHER";
	public final static String JOB_ROLE_TAG = "JOB_ROLE";
	public final static String JOB_MASTER_TAG = "JOB_MASTER";
	public final static String JOB_SLAVE_TAG = "JOB_SLAVE_TAG";
	public final static String PROCESS_STARTED = "\nHAFLUTE_1_CORE_PROCESS_STARTUP\n";
	public static final String SHUTDOWN_CLUSTER = "SHUTDOWN";
	public static final String CLUSTER_MONITOR_REF = "CLUSTER_MONITOR";
	public static final String LOCAL_MONITOR_REF = "LOCAL_MONITOR";
	public static final String SHUTDOWN_CHILD = "SHUTDOWN_CHILD";

	public static interface CLI {
		public final String JOB_MASTER_IS = "-master=";
		public final String ROOTDIR_IS = "-rootDir=";
	}

	public static interface COMMAND {
		public final String JOB_NEW_CENTER = "JOB_NEW_CENTER_IS";
		public final String SHUTDOWN = "SHUTDOWN_IMMEDIATELY";
		public final String MEMORY_JVM = "REPORT_MEMORY";
	}
}
